@extends('layouts.default')
@section('title','用户详情')
@section('content')
<div class="row">
    <div class="offset-md-2 col-md-8">
        <div class="col-md-12">
            <div class="offset-md-2 col-md-8">
                <section>
                    @include('shared._user_show',['user'=>$user])
                </section>
                @if(\Illuminate\Support\Facades\Auth::check())
                    <section>
                        @include('users._fan_btn')
                    </section>
                @endif

                <section class="mb-3">
                    @include('shared._total',['user'=>$user])
                </section>
                @if(count($posts)>0)
                <section>
                    <ul class="list-group">
                        @foreach($posts as $post)
                           @include('posts._post')
                        @endforeach

                    </ul>
                    <div class="mt-2 d-flex justify-content-end">{!! $posts->render() !!}</div>
                </section>
                @else
                <div class="text-danger text-center">他还没有发表过文章</div>
                @endif
            </div>
        </div>
    </div>
</div>
@stop
